<template>
  <div class="hello">
    hello shirylin
    <my-child @childAtellme="listenToMyGirl"></my-child>
    <p>childA tells me： {{childMsg_A}}</p>
  </div>
</template>

<script>
import myChild from './myChild'
export default {
  name: 'helloWorld',
  data () {
    return {
      childMsg_A: ''
    }
  },
  components: {
    myChild
  },
  methods: {
    listenToMyGirl (msg) {
      this.childMsg_A = msg
    }
  },
  mounted () {
    console.log(111)
    if (window.qq) {
      var geolocation = new window.qq.maps.Geolocation()
      geolocation.getLocation((position) => {
        console.log(position)
      }, 1000)
    }
  }
}
</script>
